/* POS终端专用样式 */

/* 商品列表 */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
}

/* 分类切换 */
.category-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.category-tab {
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
}

.category-tab:hover {
    background-color: var(--primary-light);
}

.category-tab.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 购物车 */
.cart-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 15px;
    margin-bottom: 20px;
}

.cart-header {
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-name {
    flex: 2;
    font-weight: bold;
}

.cart-item-price {
    flex: 1;
    color: #e74c3c;
    text-align: right;
}

.cart-item-quantity {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-quantity button:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.cart-item-quantity span {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.cart-item-subtotal {
    flex: 1;
    text-align: right;
    font-weight: bold;
}

.cart-item-remove {
    flex: 0 0 30px;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    cursor: pointer;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 18px;
    font-weight: bold;
    border-top: 1px solid var(--border-color);
}

.total-price {
    color: #e74c3c;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
}

.empty-cart {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-style: italic;
}

/* 结账页面 */
.checkout-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-method {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.payment-method.active {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: bold;
}

.payment-method-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.qrcode-container {
    text-align: center;
    margin: 20px 0;
}

.qrcode {
    max-width: 200px;
    margin: 0 auto;
}

/* 会员管理 */
.member-search {
    margin-bottom: 20px;
}

.member-card {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.member-info {
    flex: 1;
    padding: 15px;
}

.member-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.member-phone {
    color: #666;
    margin-bottom: 10px;
}

.member-points {
    color: var(--primary-color);
    font-weight: bold;
}

.member-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
    background-color: var(--light-gray);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideInUp 0.3s ease;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 576px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-methods {
        flex-direction: column;
    }
} 